#ifndef RTSP_SERVICE_RTSP_RESOLVER_H
#define RTSP_SERVICE_RTSP_RESOLVER_H

#include "rtsp_unit.h"
#include "Debug.h"
//RTSP解析状态
#define RTSPUNIT_RESPONSE_CMD                   0   //初始命令
#define RTSPUNIT_RESPONSE_PARAMETER             1   //解析参数
#define RTSPUNIT_RESPONSE_RESPONSE              2   //解析响应
#define RTSPUNIT_RESPONSE_SEND                  3   //响应发送
#define RTSPUNIT_RESPONSE_DESTROY               4   //销毁状态

#define RTSPUNIT_STATE_INIT                   0 //初始状态
#define RTSPUNIT_STATE_OPTIONS_RESOLVER       11  //解析选项
#define RTSPUNIT_STATE_OPTIONS_RESPONSE       12  //响应选项
#define RTSPUNIT_STATE_DESCRIBE_RESOLVER      13  //解析描述
#define RTSPUNIT_STATE_DESCRIBE_RESPONSE      14  //响应描述
#define RTSPUNIT_STATE_SETUP_RESOLVER         15  //解析设置
#define RTSPUNIT_STATE_SETUP_RESPONSE         16  //响应设置
#define RTSPUNIT_STATE_PLAY_RESOLVER          17  //解析播放
#define RTSPUNIT_STATE_PLAY_RESPONSE          18  //响应播放
#define RTSPUNIT_STATE_PAUSE_RESOLVER         19  //解析暂停
#define RTSPUNIT_STATE_PAUSE_RESPONSE         20  //响应暂停
#define RTSPUNIT_STATE_TEARDOWN_RESOLVER      21  //解析取消
#define RTSPUNIT_STATE_TEARDOWN_RESPONSE      22  //响应取消


#define RTSPINFO_ACCEPT_TYPE_SDP 1

#define RTSPINFO_TRANSPORT_TYPE_UDP 1
#define RTSPINFO_TRANSPORT_TYPE_TCP 2

#define RTSPINFO_TRANSPORT_WAY_UNICAST     1
#define RTSPINFO_TRANSPORT_WAY_MULTICAST   2

#include "CHashTable.h"

extern int rtsp_resolver_cmd(RTSPUnit *unit);

extern int rtsp_resolver_arg(RTSPUnit *unit);

extern CHashTable grtsp_cmd_table;      //命令哈希表
extern CHashTable grtsp_arg_table;      //参数哈希表
//extern CHashTable grtsp_word_table;;    //单词哈希表
extern void gword_hash_table_init();    //单词哈希表初始化

#endif //RTSP_SERVICE_RTSP_RESOLVER_H
